package com.jxdinfo.hussar.base.cloud.service.feign.impl;//package com.jxdinfo.hussar.base.cloud.service.feign.impl;

import com.jxdinfo.hussar.base.cloud.feign.RemoteUserDetailService;
import com.jxdinfo.hussar.base.cloud.service.SysAuthUserDetailsService;
import com.jxdinfo.hussar.platform.core.support.service.dto.LoginUser;
import com.jxdinfo.hussar.platform.core.support.service.dto.UserDetails;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class RemoteSysAuthUserDetailsServiceImpl implements SysAuthUserDetailsService {

    @Resource
    private RemoteUserDetailService remoteUserDetailService;

    @Override
    public UserDetails getLoginUserByAccount(LoginUser loginUser) {
        return remoteUserDetailService.doLoingByUserName(loginUser).getData();
    }
}
